<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OrangeCNC - ARISC firmware documentation: mod_gpio.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrangeCNC - ARISC firmware documentation
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mod__gpio_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">mod_gpio.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="mod__gpio_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef _MOD_GPIO_H</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define _MOD_GPIO_H</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="mod__msg_8h.html">mod_msg.h</a>&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#acce3b8a909ed8b957b4e411dfb7cbd91">   19</a></span>&#160;<span class="preprocessor">#define GPIO_BASE       0X01C20800 </span></div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a57257f1f2d756db5acf0a17fd6320ed1">   20</a></span>&#160;<span class="preprocessor">#define GPIO_R_BASE     0x01f02c00 </span></div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a3f5c8ef16699d8fd3b0fc4cb524a4547">   21</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_SIZE  0x24</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a76971e56a3f20fa5d1ce019a0734decd">   23</a></span>&#160;<span class="preprocessor">#define GPIO_CFG_INDEX(pin)     (((pin) &amp; 0x1F) &gt;&gt; 3)</span></div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a3008b3a1477614262af3b5d026938aad">   24</a></span>&#160;<span class="preprocessor">#define GPIO_CFG_OFFSET(pin)    (((pin) &amp; 0x7) &lt;&lt; 2)</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a188c33baad9a9f4dffd2ed5040b274c7">   26</a></span>&#160;<span class="preprocessor">#define GPIO_PORTS_CNT  8   </span></div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ac2e2cd93efe24402f7d5630848a3f196">   27</a></span>&#160;<span class="preprocessor">#define GPIO_PINS_CNT   32  </span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">enum</span> { <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04ae3d8a811f3bf7196f361be4104db68db">PA</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a8b7dd81ba2f0d15957795457d92ce139">PB</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04aa2c62b62b658ac45e83749e9e9c1cb46">PC</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04aefbc069e0ac4cd293f3ba527bec2befe">PD</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a84a0e8421125bc6ef85e43bab494f68c">PE</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04ac1b9838c8d86ff9cdb39757140ebc8ae">PF</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a4921b18e1718d2cec29b1da3e2439ef7">PG</a>, <a class="code" href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a4a0f7dc7bc13b4de9dcaf52874286bd9">PL</a> };</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">// port bank names</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a034f4fe5338ca5ef53e4079e6fca526f">   33</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_A     0</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a65089f6807c0d9bc4fe5add58f7edc30">   34</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_B     1</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ad8217abb0a8adc6f86995a95e45e2afa">   35</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_C     2</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ae675b1a60abba5a8c2b556aa735bf179">   36</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_D     3</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ae15e5784683ec8447ffa52d15485729a">   37</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_E     4</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a99223b74538f28f084ab3fa727d66481">   38</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_F     5</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a9f6362cac73e30eb6e2eb76c03ccc0ad">   39</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_G     6</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a2ef0ce720de98ac07976b4bf0e5df4da">   40</a></span>&#160;<span class="preprocessor">#define GPIO_BANK_L     7</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">// pin function</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ac72b8427733b972515f90b0f1f2bd22f">   43</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_INPUT         0</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a96ab277fe965fa7ef38f406c1bb84422">   44</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_OUTPUT        1</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#aeb956ceb23d2f013e327654bf20941d5">   45</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_BANK_A_UART0  2</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ae50661e2fbc1846cc36ac65d62782aba">   46</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_BANK_A_I2C0   2</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#aba6dca25c684319a6accf1dd59e76d91">   47</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_BANK_A_I2C1   3</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a3094ac7807915a40d5efc8157a46125e">   48</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_BANK_E_I2C2   3</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a16e055c1ef55c9d53a3397a289a513dd">   49</a></span>&#160;<span class="preprocessor">#define GPIO_FUNC_BANK_L_I2C3   2</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#adc29c2ff13d900c2f185ee95427fb06ca6a226f4143ca3b18999551694cdb72a8">   52</a></span>&#160;<span class="keyword">enum</span> { <a class="code" href="mod__gpio_8h.html#adc29c2ff13d900c2f185ee95427fb06ca6a226f4143ca3b18999551694cdb72a8">LOW</a>, <a class="code" href="mod__gpio_8h.html#adc29c2ff13d900c2f185ee95427fb06ca0c3a1dacf94061154b3ee354359c5893">HIGH</a> };</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">enum</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea19cd694d120965ce04c92e191b9293be">   57</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea19cd694d120965ce04c92e191b9293be">GPIO_MSG_SETUP_FOR_OUTPUT</a> = 0x10,</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea2816789db9d2ecab74a75e65c2c3c809">   58</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea2816789db9d2ecab74a75e65c2c3c809">GPIO_MSG_SETUP_FOR_INPUT</a>,</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea71db0b0a2e2485c03ac4971b77f3d967">   60</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea71db0b0a2e2485c03ac4971b77f3d967">GPIO_MSG_PIN_GET</a>,</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eadc8da2c38813caae013bd7933f64b7cb">   61</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eadc8da2c38813caae013bd7933f64b7cb">GPIO_MSG_PIN_SET</a>,</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea0da1eb91407dd15e92705aeddf94f277">   62</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea0da1eb91407dd15e92705aeddf94f277">GPIO_MSG_PIN_CLEAR</a>,</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea97e2d0b679905eaa1c48068c2bf7ed7c">   64</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea97e2d0b679905eaa1c48068c2bf7ed7c">GPIO_MSG_PORT_GET</a>,</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eae1d94321b43efb28bc2316670f43fd9a">   65</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eae1d94321b43efb28bc2316670f43fd9a">GPIO_MSG_PORT_SET</a>,</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eaf9b1ca8fbf09ee6def630e34ea3328fd">   66</a></span>&#160;    <a class="code" href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eaf9b1ca8fbf09ee6def630e34ea3328fd">GPIO_MSG_PORT_CLEAR</a></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;};</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a1c56baf8691304743f5a5a9667703056">   70</a></span>&#160;<span class="preprocessor">#define GPIO_MSG_BUF_LEN MSG_LEN</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">   73</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgpio__msg__port__t.html">gpio_msg_port_t</a>      { uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>; };</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structgpio__msg__port__pin__t.html#a83a04ad582de2b7d36b96f9db429c2c6">   74</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgpio__msg__port__pin__t.html">gpio_msg_port_pin_t</a>  { uint32_t <a class="code" href="structgpio__msg__port__pin__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>; uint32_t pin;  };</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structgpio__msg__port__mask__t.html#a83a04ad582de2b7d36b96f9db429c2c6">   75</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgpio__msg__port__mask__t.html">gpio_msg_port_mask_t</a> { uint32_t <a class="code" href="structgpio__msg__port__mask__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>; uint32_t mask; };</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structgpio__msg__state__t.html#a1b0c7bd4d79798ef4e0ce23894c9aeb2">   76</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgpio__msg__state__t.html">gpio_msg_state_t</a>     { uint32_t <a class="code" href="structgpio__msg__state__t.html#a1b0c7bd4d79798ef4e0ce23894c9aeb2">state</a>; };</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">// public methods as macros</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ad727c49f6f8d65ee5c8d3b6c04f3b933">   84</a></span>&#160;<span class="preprocessor">#define GPIO_PIN_SET(PORT,PIN_MASK) \</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">    *gpio_port_data[PORT] |= PIN_MASK</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#a9e814b757b057a7003d2b87d40c08da7">   88</a></span>&#160;<span class="preprocessor">#define GPIO_PIN_CLEAR(PORT,PIN_MASK_NOT) \</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor">    *gpio_port_data[PORT] &amp;= PIN_MASK_NOT</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="mod__gpio_8h.html#ae707cf62135b8abb196042836cdb7daa">   92</a></span>&#160;<span class="preprocessor">#define GPIO_PIN_GET(PORT,PIN_MASK) \</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor">    (*gpio_port_data[PORT] &amp; PIN_MASK)</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment">// export public methods</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#add17353cd876e503abc3fa755f5baca7">gpio_module_init</a>();</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#a0d3aaed2e4c7b9fc6e3619d087c6aac3">gpio_pin_setup_for_output</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t pin);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#a68a572d2c6ed3a3b5d5a75def0f78cc5">gpio_pin_setup_for_input</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t pin);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;uint32_t <a class="code" href="mod__gpio_8h.html#ad3f870ee59aefb0a99bd6cc4e7d7fd58">gpio_pin_get</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t pin);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#a23cdd4156dd0a9e343f6cc7e9396d6a2">gpio_pin_set</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t pin);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#a6f4fd583d7d2c87e80487e15e9b1565a">gpio_pin_clear</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t pin);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;uint32_t <a class="code" href="mod__gpio_8h.html#a2979b18350aa4ac94e0a9ae8026dc735">gpio_port_get</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#aba8f0bc9701f36e3048dbefc81518054">gpio_port_set</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t mask);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="keywordtype">void</span> <a class="code" href="mod__gpio_8h.html#afdcdd3eb9af000552dc8f1a54b7a659c">gpio_port_clear</a>(uint32_t <a class="code" href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">port</a>, uint32_t mask);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;int8_t <span class="keyword">volatile</span> <a class="code" href="mod__gpio_8h.html#a4fc4234962ca0dfcb1c8a81b5a863668">gpio_msg_recv</a>(uint8_t type, uint8_t * msg, uint8_t length);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="structgpio__msg__port__t_html"><div class="ttname"><a href="structgpio__msg__port__t.html">gpio_msg_port_t</a></div><div class="ttdoc">the message data access </div><div class="ttdef"><b>Definition:</b> mod_gpio.h:73</div></div>
<div class="ttc" id="mod__gpio_8h_html_a4fc4234962ca0dfcb1c8a81b5a863668"><div class="ttname"><a href="mod__gpio_8h.html#a4fc4234962ca0dfcb1c8a81b5a863668">gpio_msg_recv</a></div><div class="ttdeci">int8_t volatile gpio_msg_recv(uint8_t type, uint8_t *msg, uint8_t length)</div><div class="ttdoc">&quot;message received&quot; callback </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:209</div></div>
<div class="ttc" id="mod__gpio_8h_html_aba8f0bc9701f36e3048dbefc81518054"><div class="ttname"><a href="mod__gpio_8h.html#aba8f0bc9701f36e3048dbefc81518054">gpio_port_set</a></div><div class="ttdeci">void gpio_port_set(uint32_t port, uint32_t mask)</div><div class="ttdoc">set port pins state by mask </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:171</div></div>
<div class="ttc" id="mod__gpio_8h_html_a0d3aaed2e4c7b9fc6e3619d087c6aac3"><div class="ttname"><a href="mod__gpio_8h.html#a0d3aaed2e4c7b9fc6e3619d087c6aac3">gpio_pin_setup_for_output</a></div><div class="ttdeci">void gpio_pin_setup_for_output(uint32_t port, uint32_t pin)</div><div class="ttdoc">set pin mode to OUTPUT </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:92</div></div>
<div class="ttc" id="structgpio__msg__port__mask__t_html"><div class="ttname"><a href="structgpio__msg__port__mask__t.html">gpio_msg_port_mask_t</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:75</div></div>
<div class="ttc" id="structgpio__msg__port__t_html_a83a04ad582de2b7d36b96f9db429c2c6"><div class="ttname"><a href="structgpio__msg__port__t.html#a83a04ad582de2b7d36b96f9db429c2c6">gpio_msg_port_t::port</a></div><div class="ttdeci">uint32_t port</div><div class="ttdef"><b>Definition:</b> mod_gpio.h:73</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04ac1b9838c8d86ff9cdb39757140ebc8ae"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04ac1b9838c8d86ff9cdb39757140ebc8ae">PF</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9eae1d94321b43efb28bc2316670f43fd9a"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eae1d94321b43efb28bc2316670f43fd9a">GPIO_MSG_PORT_SET</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:65</div></div>
<div class="ttc" id="mod__gpio_8h_html_adc29c2ff13d900c2f185ee95427fb06ca6a226f4143ca3b18999551694cdb72a8"><div class="ttname"><a href="mod__gpio_8h.html#adc29c2ff13d900c2f185ee95427fb06ca6a226f4143ca3b18999551694cdb72a8">LOW</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:52</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04a8b7dd81ba2f0d15957795457d92ce139"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a8b7dd81ba2f0d15957795457d92ce139">PB</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="structgpio__msg__port__pin__t_html_a83a04ad582de2b7d36b96f9db429c2c6"><div class="ttname"><a href="structgpio__msg__port__pin__t.html#a83a04ad582de2b7d36b96f9db429c2c6">gpio_msg_port_pin_t::port</a></div><div class="ttdeci">uint32_t port</div><div class="ttdef"><b>Definition:</b> mod_gpio.h:74</div></div>
<div class="ttc" id="mod__gpio_8h_html_a2979b18350aa4ac94e0a9ae8026dc735"><div class="ttname"><a href="mod__gpio_8h.html#a2979b18350aa4ac94e0a9ae8026dc735">gpio_port_get</a></div><div class="ttdeci">uint32_t gpio_port_get(uint32_t port)</div><div class="ttdoc">get port state </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:154</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9eaf9b1ca8fbf09ee6def630e34ea3328fd"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eaf9b1ca8fbf09ee6def630e34ea3328fd">GPIO_MSG_PORT_CLEAR</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:66</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04ae3d8a811f3bf7196f361be4104db68db"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04ae3d8a811f3bf7196f361be4104db68db">PA</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_a68a572d2c6ed3a3b5d5a75def0f78cc5"><div class="ttname"><a href="mod__gpio_8h.html#a68a572d2c6ed3a3b5d5a75def0f78cc5">gpio_pin_setup_for_input</a></div><div class="ttdeci">void gpio_pin_setup_for_input(uint32_t port, uint32_t pin)</div><div class="ttdoc">set pin mode to INPUT </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:103</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9ea0da1eb91407dd15e92705aeddf94f277"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea0da1eb91407dd15e92705aeddf94f277">GPIO_MSG_PIN_CLEAR</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:62</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04a4a0f7dc7bc13b4de9dcaf52874286bd9"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a4a0f7dc7bc13b4de9dcaf52874286bd9">PL</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_ad3f870ee59aefb0a99bd6cc4e7d7fd58"><div class="ttname"><a href="mod__gpio_8h.html#ad3f870ee59aefb0a99bd6cc4e7d7fd58">gpio_pin_get</a></div><div class="ttdeci">uint32_t gpio_pin_get(uint32_t port, uint32_t pin)</div><div class="ttdoc">get pin state </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:118</div></div>
<div class="ttc" id="mod__gpio_8h_html_adc29c2ff13d900c2f185ee95427fb06ca0c3a1dacf94061154b3ee354359c5893"><div class="ttname"><a href="mod__gpio_8h.html#adc29c2ff13d900c2f185ee95427fb06ca0c3a1dacf94061154b3ee354359c5893">HIGH</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:52</div></div>
<div class="ttc" id="mod__msg_8h_html"><div class="ttname"><a href="mod__msg_8h.html">mod_msg.h</a></div><div class="ttdoc">ARM-ARISC message control module header. </div></div>
<div class="ttc" id="mod__gpio_8h_html_add17353cd876e503abc3fa755f5baca7"><div class="ttname"><a href="mod__gpio_8h.html#add17353cd876e503abc3fa755f5baca7">gpio_module_init</a></div><div class="ttdeci">void gpio_module_init()</div><div class="ttdoc">module init </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:72</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04aefbc069e0ac4cd293f3ba527bec2befe"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04aefbc069e0ac4cd293f3ba527bec2befe">PD</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9eadc8da2c38813caae013bd7933f64b7cb"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9eadc8da2c38813caae013bd7933f64b7cb">GPIO_MSG_PIN_SET</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:61</div></div>
<div class="ttc" id="structgpio__msg__state__t_html"><div class="ttname"><a href="structgpio__msg__state__t.html">gpio_msg_state_t</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:76</div></div>
<div class="ttc" id="mod__gpio_8h_html_a6f4fd583d7d2c87e80487e15e9b1565a"><div class="ttname"><a href="mod__gpio_8h.html#a6f4fd583d7d2c87e80487e15e9b1565a">gpio_pin_clear</a></div><div class="ttdeci">void gpio_pin_clear(uint32_t port, uint32_t pin)</div><div class="ttdoc">set pin state to LOW (0) </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:140</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04a4921b18e1718d2cec29b1da3e2439ef7"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a4921b18e1718d2cec29b1da3e2439ef7">PG</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04aa2c62b62b658ac45e83749e9e9c1cb46"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04aa2c62b62b658ac45e83749e9e9c1cb46">PC</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9ea2816789db9d2ecab74a75e65c2c3c809"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea2816789db9d2ecab74a75e65c2c3c809">GPIO_MSG_SETUP_FOR_INPUT</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:58</div></div>
<div class="ttc" id="structgpio__msg__port__pin__t_html"><div class="ttname"><a href="structgpio__msg__port__pin__t.html">gpio_msg_port_pin_t</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:74</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9ea97e2d0b679905eaa1c48068c2bf7ed7c"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea97e2d0b679905eaa1c48068c2bf7ed7c">GPIO_MSG_PORT_GET</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:64</div></div>
<div class="ttc" id="mod__gpio_8h_html_a23cdd4156dd0a9e343f6cc7e9396d6a2"><div class="ttname"><a href="mod__gpio_8h.html#a23cdd4156dd0a9e343f6cc7e9396d6a2">gpio_pin_set</a></div><div class="ttdeci">void gpio_pin_set(uint32_t port, uint32_t pin)</div><div class="ttdoc">set pin state to HIGH (1) </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:129</div></div>
<div class="ttc" id="structgpio__msg__port__mask__t_html_a83a04ad582de2b7d36b96f9db429c2c6"><div class="ttname"><a href="structgpio__msg__port__mask__t.html#a83a04ad582de2b7d36b96f9db429c2c6">gpio_msg_port_mask_t::port</a></div><div class="ttdeci">uint32_t port</div><div class="ttdef"><b>Definition:</b> mod_gpio.h:75</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9ea71db0b0a2e2485c03ac4971b77f3d967"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea71db0b0a2e2485c03ac4971b77f3d967">GPIO_MSG_PIN_GET</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:60</div></div>
<div class="ttc" id="mod__gpio_8h_html_a61dadd085c1777f559549e05962b2c9ea19cd694d120965ce04c92e191b9293be"><div class="ttname"><a href="mod__gpio_8h.html#a61dadd085c1777f559549e05962b2c9ea19cd694d120965ce04c92e191b9293be">GPIO_MSG_SETUP_FOR_OUTPUT</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:57</div></div>
<div class="ttc" id="mod__gpio_8h_html_abc6126af1d45847bc59afa0aa3216b04a84a0e8421125bc6ef85e43bab494f68c"><div class="ttname"><a href="mod__gpio_8h.html#abc6126af1d45847bc59afa0aa3216b04a84a0e8421125bc6ef85e43bab494f68c">PE</a></div><div class="ttdef"><b>Definition:</b> mod_gpio.h:30</div></div>
<div class="ttc" id="structgpio__msg__state__t_html_a1b0c7bd4d79798ef4e0ce23894c9aeb2"><div class="ttname"><a href="structgpio__msg__state__t.html#a1b0c7bd4d79798ef4e0ce23894c9aeb2">gpio_msg_state_t::state</a></div><div class="ttdeci">uint32_t state</div><div class="ttdef"><b>Definition:</b> mod_gpio.h:76</div></div>
<div class="ttc" id="mod__gpio_8h_html_afdcdd3eb9af000552dc8f1a54b7a659c"><div class="ttname"><a href="mod__gpio_8h.html#afdcdd3eb9af000552dc8f1a54b7a659c">gpio_port_clear</a></div><div class="ttdeci">void gpio_port_clear(uint32_t port, uint32_t mask)</div><div class="ttdoc">clear port pins state by mask </div><div class="ttdef"><b>Definition:</b> mod_gpio.c:188</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="mod__gpio_8h.html">mod_gpio.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
